<%@ page language="java" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<%@ include file="/pub/head_latest.inc"%>
<title>员工管理框架-${basePageTitle}</title>
<style>

</style>
<script type="text/javascript">
            var tree = null;
            $(function(){
                //布局
                $("#layoutFrame").ligerLayout({ leftWidth: 250, height: '100%',space:2});
				var height = $(".l-layout-center").height();
				 //Tab
                var tab = $("#framecenter").ligerTab({ height: height });
                //面板
                var accordion = $("#accordionFrame").ligerAccordion({ height: height - 5, speed: null });
                //使树结构的标头不显示
                $(".l-accordion-header").height("0px");
                //使左栏列表标头也不显示
                $("#framecenter .l-tab-links").remove();
                
 				 tree = $("#tree1").ligerTree({
 					 	url: '${baseURL}/system/security/resourcetree/tree.do', 
 					 	checkbox: false,
 					 	idFieldName :'id',
            			parentIDFieldName :'pid',
            			textFieldName : "name",
            			attribute : ['id', 'name', 'pid'],
            			onAfterAppend : function(){
            				$("#tree1").attr("style","width:100%;");
            			},
            			isLeaf : function(data){
            				if (!data) return false;
                            return !data.hasChild;
            			},
            			onSelect: function (node){	             
 					 		//获得节点ID值
		                   var nodeId = node.data.id;
		                    //显示右边列表
		                    $("#fbody").attr("src", "${baseURL}/system/security/resource/listResource.do?parentResourceId="+nodeId+"&menuId=${param.menuId}");
		                 }
 					 });
                $("#pageloading").hide();
            });

            function FF_Reload(){
            	tree.reload();
            }
     </script>
</head>
<body>
	<div id="pageloading"></div>
	<!-- BODY!!! -->
	<!-- 左边菜单!!! -->
	<div id="layoutFrame" style="width:99.2%; margin:0 auto;">
		<div position="left" title="菜单管理" id="accordionFrame">
			<div title="(该标头隐藏不显示)" class="l-scroll">
				<ul id="tree1" style="margin-top:3px;"></ul>
				<br/>
				<br/>
			</div>                 
        </div>
		<!-- 右边内容!!! -->
		<div position="center" id="framecenter">
			<div id="divList" tabid="tabContent" title="列表页面不显示标头" >
			<!-- 包含列表页面 -->
				<iframe frameborder="0" name="fbody" id="fbody" src="${baseURL}/system/security/resource/listResource.do"></iframe>
			</div>
			<div id="divForm" class="content2">
				<iframe src="about:blank" id="fform" scrolling="no" frameborder="0" name="fform" width="100%" height="600px"></iframe>
			</div>
		</div>
	</div>
</body>
</html>

